package com.example.designmode.factoryMethod;

import java.math.BigDecimal;

//加法
public class AddOperation extends OperationAbstract {

    @Override
    public double calculate(double number1, double number2) {
        BigDecimal bd1 = new BigDecimal(number1);
        BigDecimal bd2 = new BigDecimal(number2);
        return bd1.add(bd2).doubleValue();
    }

}
